package com.chen.springcloud.service;

import com.chen.springcloud.entity.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @ClassName
 * @Description: 客户端的服务
 * @Author:
 * @Date: Created in 20:57 2022/6/5
 */
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT")
@Component
public interface DeptClientService {
    /**
     *  添加部门信息
     * @param dept
     * @return
     */
    @PostMapping("/deptProvider/saveDeptInfo")
    Boolean saveDeptInfo(Dept dept);

    /**
     *  通过id 查询部门信息
     * @param id
     * @return
     */
    @GetMapping("/deptProvider/queryDeptById/{id}")
    Dept queryDeptById(@PathVariable("id")Integer id);

    /**
     *  查询所有部门信息
     * @param
     * @return
     */
    @GetMapping("/deptProvider/queryDeptAll")
    List<Dept> queryDeptAll();
}
